package shape1;

import java.util.ArrayList;
import java.util.List;

public class App {
	
	static List<Shape> shapes = new ArrayList<Shape>();

	public static void main(String[] args) {
		Shape s = new Circle(10.0,"太阳");
		Shape s2 = new Circle(1.0,"月亮");
		shapes.add(s);
		shapes.add(s2);
		shapes.add(new Rectangle(12,13,"桌面"));
		
		
		String name=s.getName();
		double area = s.area();
		System.out.println(area);
		
		Shape r = new Rectangle(5.0,6.0,"矩形");
		double area1=r.area();
		System.out.println(area1);

	}

}
